<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三角</title>
    <style>
        .box1 {
            width: 0;
            height: 0;
            border: 50px solid transparent;
            border-color: red green blue black;
            line-height: 0;
            font-size: 0;
            
        }
        .box2 {
            width: 0;
            height: 0;
            border: 20px solid transparent;
            border-left-color: pink;
            margin: 40px auto;
        }
        .jd {
            position: relative;
            width: 230px;
            height: 330px;
            background-color: pink;
            cursor: not-allowed;
            
        }
        span {
            position: absolute;
            width: 0;
            height: 0;
            border: 5px solid transparent;
            right: 10px;
            top: -10px;
            border-bottom-color: pink;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="jd">
        <span></span>
    </div>
</body>
<!-- 
    我们用css 边框可以模拟三角效果
    宽度高度为0
    我们4个边框都要写， 只保留需要的边框颜色，其余的不能省略，都改为 transparent 透明就好了
    为了照顾兼容性 低版本的浏览器，加上 font-size: 0; line-height: 0;
 -->
</html>